#!/usr/bin/python
# -*- coding: UTF-8 -*-
import matplotlib.pyplot as plot
import numpy as np
'''
family: A list of font names in decreasing order of priority. The items may include a generic font family name,
either ‘serif’, ‘sans-serif’, ‘cursive’, ‘fantasy’, or ‘monospace’.
In that case, the actual font to be used will be looked up from the associated rcParam in matplotlibrc.
style: Either ‘normal’, ‘italic’ or ‘oblique’.
weight: A numeric value in the range 0-1000 or one of ‘ultralight’, ‘light’, ‘normal’, ‘regular’, ‘book’, ‘medium’, ‘roman’, ‘semibold’, ‘demibold’, ‘demi’, ‘bold’, ‘heavy’, ‘extra bold’, ‘black’
size: Either an relative value of ‘xx-small’, ‘x-small’, ‘small’, ‘medium’, ‘large’, ‘x-large’, ‘xx-large’ or an absolute font size, e.g., 12
'''
x=np.arange(-10,11,1)
y=x**2
plot.plot(x,y)
plot.text(0,40,"y=x**2",size=20,family="fantasy",color="r",style="italic",weight="black")
plot.text(-2,20,"y=x**2",size=20,family="fantasy",color="r",style="oblique",weight="demibold",bbox=dict(facecolor="r",alpha=0.2))
plot.show()